package com.intellij.licensecommon.util;

import java.util.Date;

public class LicenseInfo implements Cloneable {
    public static LicenseInfo DEFAULT_LICENSE = new LicenseInfo();
    public String b;

    static {
        DEFAULT_LICENSE.b = "Fake";
        DEFAULT_LICENSE.productId = 0;
        DEFAULT_LICENSE.licenseId = 1;
        DEFAULT_LICENSE.majorVersion = 1;
        DEFAULT_LICENSE.minorVersion = 0;
        DEFAULT_LICENSE.generationDate = customerId.a(1995, 1, 1);
        DEFAULT_LICENSE.expirationDate = customerId.a(1995, 1, 2);
    }

    public int customerId = -1;
    public int productId;
    public int licenseId;
    public int majorVersion;
    public int minorVersion;
    public Date generationDate;
    public Date expirationDate;
    public Date j;

    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException localCloneNotSupportedException) {
            localCloneNotSupportedException.printStackTrace();
        }
        return null;
    }

    public boolean equals(Object paramObject) {
        if (this == paramObject) {
            return true;
        }
        if (!(paramObject instanceof LicenseInfo)) {
            return false;
        }
        LicenseInfo locale = (LicenseInfo) paramObject;
        if (this.customerId != locale.customerId) {
            return false;
        }
        if (this.licenseId != locale.licenseId) {
            return false;
        }
        if (this.majorVersion != locale.majorVersion) {
            return false;
        }
        if (this.minorVersion != locale.minorVersion) {
            return false;
        }
        if (this.productId != locale.productId) {
            return false;
        }
        if (this.expirationDate != null ? !this.expirationDate.equals(locale.expirationDate) : locale.expirationDate != null) {
            return false;
        }
        if (this.generationDate != null ? !this.generationDate.equals(locale.generationDate) : locale.generationDate != null) {
            return false;
        }
        if (this.b != null ? !this.b.equals(locale.b) : locale.b != null) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        return this.b != null ? this.b.hashCode() : 0;
    }

    public String toString() {
        StringBuffer localStringBuffer = new StringBuffer();
        localStringBuffer.append("\n");
        localStringBuffer.append("user name:" + this.b + "\n");
        localStringBuffer.append("customer id:" + this.customerId + "\n");
        localStringBuffer.append("product id:" + generationDate.a(this.productId) + "\n");
        localStringBuffer.append("license type:" + minorVersion.a(this.licenseId) + "\n");
        localStringBuffer.append("major version:" + this.majorVersion + "\n");
        localStringBuffer.append("minor version:" + this.minorVersion + "\n");
        localStringBuffer.append("generationDate:" + this.generationDate + "\n");
        localStringBuffer.append("expirationDate:" + this.expirationDate + "\n");
        return localStringBuffer.toString();
    }
}
